import Layout from "@/components/layout"
import AnalyzeStep from "@/components/ui/chat/ChatSteps/AnalyzeStep"
import CompleteStep from "@/components/ui/chat/ChatSteps/CompleteStep"
import ProcessStep from "@/components/ui/chat/ChatSteps/ProcessStep"
import BookDetailPage from "@/pages/BookDetailPage"
import ChatPage from "@/pages/ChatPage"
import Home from "@/pages/Home"
import NotFoundPage from "@/pages/NotFoundPage"
import { createBrowserRouter } from "react-router-dom"

export const appName = "Kotlin AI Web"

export const routesConfig = [
  {
    path: "/",
    element: <Layout />,
    children: [
      { path: "", element: <Home />, id: "home" },
      {
        path: "chat",
        element: <ChatPage />,
        id: "chat",
        children: [
          { index: true, element: <AnalyzeStep />, id: "chat-analyze-index" },
          { path: "analyze", element: <AnalyzeStep />, id: "chat-analyze" },
          { path: "process", element: <ProcessStep />, id: "chat-process" },
          { path: "complete", element: <CompleteStep />, id: "chat-complete" },
        ],
      },
      { path: "book-detail", element: <BookDetailPage />, id: "book-detail" },
    ],
  },
  { path: "*", element: <NotFoundPage />, id: "not-found" },
]

export const appRouter = createBrowserRouter(routesConfig)
